class Student:
    count = 0  # 类属性

    def __init__(self, name, score):
        self.name = name
        self.score = score
        Student.count += 1

    def print_score(self):
        print('{0}的成绩是{1}'.format(self.name, self.score))

    @classmethod
    def cls_func(cls):
        print(cls.count)

    @staticmethod
    def add(a, b):
        return a + b


stu = Student('陈建', 100)
stu.print_score()

stu1 = Student('张三', 90)
stu2 = Student('李四', 90)

stu.cls_func()


print('创建了{0}个对象'.format(Student.count))
